package com.zzy.base;

/**
 * File descripition:   异常处理基类
 *
 * @author lp
 * @date 2018/8/24
 */

public class ApiException extends RuntimeException {
    private int errorCode;
    String message;

    @Override
    public String getMessage() {
        return message;
    }

    public void setMessage(String message) {
        this.message = message;
    }

    public ApiException(int code, String msg, String toastMsg) {
        super(msg);
        this.errorCode = code;
        this.message=toastMsg;
    }

    public void setErrorCode(int errorCode) {
        this.errorCode = errorCode;
    }

    public int getErrorCode() {
        return errorCode;
    }

}
